<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <link href="http://cdn.bootcss.com/highlight.js/9.6.0/styles/monokai_sublime.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/highlight.js/9.8.0/highlight.min.js"></script>
</head>
<body>
<script>hljs.initHighlightingOnLoad();</script>

<h1 id="brnbspnbspnbspnbspnbspidididbrnbspnbspnbspnbspnbspbrnbspnbspnbspnbspnbspnbspnbspnbspintegerlastidreleasenewpostdaoselectlastidbrnbspnbspnbspnbspnbspnbspnbspnbspiflastidnullbrnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsppostentitysetpostidlastid1brnbspnbspnbspnbspnbspnbspnbspnbspelsebrnbspnbspnbspnbspnbspnbspnbspnbsp1brnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspsimpledateformatdateformatnewsimpledateformatyymmddbrnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspintidintegervalueofdateformatformatnewdate1brnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsppostentitysetpostididbrnbspnbspnbspnbspnbspnbspnbspnbspbrnbspnbspnbspnbspnbspbr">
    把沙发垫<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /<em>根据上一个id计算当前id，如果为空，根据当前时间生成id</em>/<br>&nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp; {<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; Integer lastId =
    releaseNewpostDao.selectLastId();<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; if (lastId !=
    null)//非当天首次<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;postEntity.setPostId(lastId +
    1);<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; else<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    {//当天首次，默认为"前缀+1"<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;SimpleDateFormat
    dateFormat = new SimpleDateFormat("yyMMdd");<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;int id = Integer.valueOf(dateFormat.format(new Date()) + "1");<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;postEntity.setPostId(id);<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
    }<br>&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; }<br></h1>release_newpost.js:73:13


</body>
</html>